/*=====================================================================================================================
                    Copyright (c) 2009 Geometric PLM Solutions Inc.
                             Unpublished - All rights reserved

=======================================================================================================================
File description:

    Filename: common_macros.h
    Module  : Teamcenter common module

    This file describes functions for common macro.

=======================================================================================================================
Date                  Name                Description of Change
2017-05-06            bayern              Initialize creation
$HISTORY$
=====================================================================================================================*/
#ifndef COMMON_MACROS_H
#define COMMON_MACROS_H

#include <tc/emh.h>
#include <tc/tc.h>
#include <ai\sample_err.h>

// Common macro
#define DELIMITER_COMMA     ","
#define USER_SERVICE_LOG_SWITCH   true


static const char* EOL          =   "\n";

// pointer of log file
static FILE *logfile_ptr;

// define debug mode
static logical debug = false;

static logical FBH_debug = false;

#define CALL_GO(x,ifail,function_exit) {               \
	int stat;                     \
	char *err_string;             \
	if( (stat = (x)) != ITK_ok)   \
{                             \
	EMH_ask_error_text (stat, &err_string);              \
	printf ("ERROR: %d ERROR MSG: %s.\n", stat, err_string);        \
	printf ("Function: %s FILE: %s LINE: %d\n",#x, __FILE__, __LINE__);     \
	MEM_free (err_string);   \
	ifail = stat;            \
	goto function_exit;          \
}                         \
}


#endif
